package cn.ichiva.enity;

import lombok.Data;
import org.springframework.data.mongodb.core.index.Indexed;
import org.springframework.data.mongodb.core.mapping.Document;

import java.util.List;

/**
 * @Description
 * @auther @author Qp Group
 * @create 2020-03-02 11:02
 */
@Document
@Data
public class User {
    private String id;
    @Indexed(unique = true)//唯一键所应
    private String name;
    private List<Role> roles;
}
